import java.util.Scanner;

public class lanqiaodigui {
        public static void main(String[] args) {
            Scanner sc = new Scanner(System.in);
            float x = sc.nextFloat();
            float n = sc.nextFloat();
            if (n < 5)
                System.out.printf("%.2f", fac(x, n));
            else
                System.out.printf("%.3f", fac(x, n));
        }

        public static float fac(float x, float n) {
            if (n == 0) return 1;
            if (n == 1) return 2 * x;
            return (float) (2.0 * x * fac(x, n - 1) - 2.0 * (n - 1) * fac(x, n - 2));
        }

}
